<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
        <title>配置 Apache 服务器 | iOS 网络编程</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.0.1">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    
    
    <link rel="next" href="./basic-01-http.html" />
    
    
    <link rel="prev" href="./basic.html" />
    

        
    </head>
    <body>
        
        
    <link rel="stylesheet" href="gitbook/style.css">
    
    

        
    <div class="book" data-level="0.1.1" data-basepath="." data-revision="Fri Jun 12 2015 06:59:00 GMT+0800 (CST)">
    

<div class="book-summary">
    <div class="book-search">
        <input type="text" placeholder="Type to search" class="form-control" />
    </div>
    <ul class="summary">
        
        
        
        

        

        
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                        <i class="fa fa-check"></i>
                        
                        网络
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.1" data-path="basic.html">
            
                
                    <a href="./basic.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.</b>
                        
                        基本概念
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="0.1.1" data-path="basic-00-apache.html">
            
                
                    <a href="./basic-00-apache.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.1.</b>
                        
                        配置 Apache 服务器
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.1.2" data-path="basic-01-http.html">
            
                
                    <a href="./basic-01-http.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.2.</b>
                        
                        HTTP
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.1.3" data-path="basic-02-dev.html">
            
                
                    <a href="./basic-02-dev.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.3.</b>
                        
                        开发方案
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.1.4" data-path="basic-03-nsurlconnection.html">
            
                
                    <a href="./basic-03-nsurlconnection.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.4.</b>
                        
                        NSURLConnection
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.2" data-path="socket.html">
            
                
                    <a href="./socket.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.</b>
                        
                        socket
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.2.1" data-path="socket-01-basic_code.html">
            
                
                    <a href="./socket-01-basic_code.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.1.</b>
                        
                        Socket 基本演练
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.2.2" data-path="socket-02-chat.html">
            
                
                    <a href="./socket-02-chat.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.2.</b>
                        
                        Socket 聊天
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.2.3" data-path="socket-03-baidu.html">
            
                
                    <a href="./socket-03-baidu.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.3.</b>
                        
                        Socket 加载百度
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.3" data-path="serialization.html">
            
                
                    <a href="./serialization.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.</b>
                        
                        数据解析
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.3.1" data-path="serialization-01-json.html">
            
                
                    <a href="./serialization-01-json.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.1.</b>
                        
                        JSON 解析
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.3.1.1" data-path="json-01-framework.html">
            
                
                    <a href="./json-01-framework.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.1.1.</b>
                        
                        JSON 解析第三方框架
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.3.2" data-path="serialization-03-plist.html">
            
                
                    <a href="./serialization-03-plist.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.2.</b>
                        
                        PList解析
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3" data-path="serialization-04-xml.html">
            
                
                    <a href="./serialization-04-xml.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.</b>
                        
                        XML介绍
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.3.3.1" data-path="xml-01-preparation.html">
            
                
                    <a href="./xml-01-preparation.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.1.</b>
                        
                        准备工作
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.2" data-path="xml-02-parser.html">
            
                
                    <a href="./xml-02-parser.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.2.</b>
                        
                        解析
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.3" data-path="xml-03-tableview.html">
            
                
                    <a href="./xml-03-tableview.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.3.</b>
                        
                        绑定表格
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.4" data-path="xml-04-copy_properties.html">
            
                
                    <a href="./xml-04-copy_properties.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.4.</b>
                        
                        Copy 属性
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.5" data-path="xml-05-refactor.html">
            
                
                    <a href="./xml-05-refactor.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.5.</b>
                        
                        重构
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.6" data-path="xml-06-dom.html">
            
                
                    <a href="./xml-06-dom.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.6.</b>
                        
                        DOM 解析
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.4" data-path="get_&amp;_post.html">
            
                
                    <a href="./get_&amp;_post.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.4.</b>
                        
                        GET &amp; POST
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.4.1" data-path="get_&amp;_post-01-cachedurlresponse.html">
            
                
                    <a href="./get_&amp;_post-01-cachedurlresponse.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.4.1.</b>
                        
                        GET 缓存
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.5" data-path="user_login.html">
            
                
                    <a href="./user_login.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.</b>
                        
                        用户登录
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.5.1" data-path="user_login-01-get&amp;post_login.html">
            
                
                    <a href="./user_login-01-get&amp;post_login.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.1.</b>
                        
                        GET &amp; POST 登录
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.5.2" data-path="user_login-02-save_&amp;_load_user_info.html">
            
                
                    <a href="./user_login-02-save_&amp;_load_user_info.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.2.</b>
                        
                        保存 &amp; 加载用户信息
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.5.3" data-path="user_login-03-refactor.html">
            
                
                    <a href="./user_login-03-refactor.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.3.</b>
                        
                        代码重构
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.6" data-path="cipher.html">
            
                
                    <a href="./cipher.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.</b>
                        
                        密码学
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.6.1" data-path="cipher-01-base64.html">
            
                
                    <a href="./cipher-01-base64.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.1.</b>
                        
                        Base64
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.6.2" data-path="cipher-02-md5.html">
            
                
                    <a href="./cipher-02-md5.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.2.</b>
                        
                        MD5
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.6.3" data-path="cipher-03-key_chain.html">
            
                
                    <a href="./cipher-03-key_chain.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.3.</b>
                        
                        钥匙串
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.6.4" data-path="cipher-04-aes.html">
            
                
                    <a href="./cipher-04-aes.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.4.</b>
                        
                        对称加密算法
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.6.5" data-path="cipher-05-rsa.html">
            
                
                    <a href="./cipher-05-rsa.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.5.</b>
                        
                        非对称加密算法
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.7" data-path="post_method.html">
            
                
                    <a href="./post_method.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.</b>
                        
                        POST增强
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.7.1" data-path="post_method-01-upload_file.html">
            
                
                    <a href="./post_method-01-upload_file.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.1.</b>
                        
                        上传单个文件
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.7.2" data-path="post_method-02-upload_multi_files.html">
            
                
                    <a href="./post_method-02-upload_multi_files.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.2.</b>
                        
                        上传多个文件
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.7.3" data-path="post_method_03_restful.html">
            
                
                    <a href="./post_method_03_restful.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.3.</b>
                        
                        RESTful设计风格
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.7.4" data-path="post_method-04-post_json.html">
            
                
                    <a href="./post_method-04-post_json.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.4.</b>
                        
                        POST JSON
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.7.5" data-path="post_method-05-post_custom_object.html">
            
                
                    <a href="./post_method-05-post_custom_object.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.5.</b>
                        
                        POST 自定义对象
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.8" data-path="download.html">
            
                
                    <a href="./download.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.</b>
                        
                        NSURLConnection下载
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.8.1" data-path="download-01-head_method.html">
            
                
                    <a href="./download-01-head_method.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.1.</b>
                        
                        HTTP HEAD方法
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.2" data-path="download-02-nsurlconnectiondownloaddelegate.html">
            
                
                    <a href="./download-02-nsurlconnectiondownloaddelegate.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.2.</b>
                        
                        NSURLConnectionDownloadDelegate
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.3" data-path="download-03-download_progress.html">
            
                
                    <a href="./download-03-download_progress.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.3.</b>
                        
                        下载进度
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.4" data-path="download-04-nsfilehandle.html">
            
                
                    <a href="./download-04-nsfilehandle.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.4.</b>
                        
                        NSFileHandle拼接文件
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.5" data-path="download-05-nsoutputstream.html">
            
                
                    <a href="./download-05-nsoutputstream.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.5.</b>
                        
                        NSOutputStream拼接文件
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.6" data-path="download-06-resume_download.html">
            
                
                    <a href="./download-06-resume_download.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.6.</b>
                        
                        断点续传
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.7" data-path="download-07-multithread.html">
            
                
                    <a href="./download-07-multithread.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.7.</b>
                        
                        多线程
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.8" data-path="download-08-call_back.html">
            
                
                    <a href="./download-08-call_back.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.8.</b>
                        
                        完成回调
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.9" data-path="download-09-pause_download.html">
            
                
                    <a href="./download-09-pause_download.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.9.</b>
                        
                        暂停下载
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.10" data-path="download-10-progress_view.html">
            
                
                    <a href="./download-10-progress_view.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.10.</b>
                        
                        下载进度视图
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.11" data-path="download-11-download_manager.html">
            
                
                    <a href="./download-11-download_manager.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.11.</b>
                        
                        下载管理器
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.12" data-path="download-12-nsoperation.html">
            
                
                    <a href="./download-12-nsoperation.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.12.</b>
                        
                        NSOperation
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.9" data-path="nsurlsession.html">
            
                
                    <a href="./nsurlsession.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.</b>
                        
                        NSURLSession
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.9.1" data-path="nsurlsession-01-common_code.html">
            
                
                    <a href="./nsurlsession-01-common_code.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.1.</b>
                        
                        常见代码
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.2" data-path="nsurlsession-02-download.html">
            
                
                    <a href="./nsurlsession-02-download.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.2.</b>
                        
                        下载 &amp; 解压缩
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.9.2.1" data-path="nsurlsession-02-download-01-progress.html">
            
                
                    <a href="./nsurlsession-02-download-01-progress.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.2.1.</b>
                        
                        下载进度跟进
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.2.2" data-path="nsurlsession-02-download-02-resume_data.html">
            
                
                    <a href="./nsurlsession-02-download-02-resume_data.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.2.2.</b>
                        
                        断点续传
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.2.3" data-path="nsurlsession-02-download-03-download_manager.html">
            
                
                    <a href="./nsurlsession-02-download-03-download_manager.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.2.3.</b>
                        
                        下载管理器
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.9.3" data-path="nsurlsession-03-webdav.html">
            
                
                    <a href="./nsurlsession-03-webdav.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.3.</b>
                        
                        WebDav演练
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.4" data-path="nsurlsession-04-configuration.html">
            
                
                    <a href="./nsurlsession-04-configuration.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.4.</b>
                        
                        Configuration
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.5" data-path="nsurlsession-05-post_upload.html">
            
                
                    <a href="./nsurlsession-05-post_upload.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.5.</b>
                        
                        POST 上传
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.10" data-path="https.html">
            
                
                    <a href="./https.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.10.</b>
                        
                        HTTPS
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.11" data-path="biometrics.html">
            
                
                    <a href="./biometrics.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.11.</b>
                        
                        指纹识别
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12" data-path="appendix.html">
            
                
                    <a href="./appendix.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.</b>
                        
                        附录
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.12.1" data-path="appendix-01-archiver_&amp;_unarchiver.html">
            
                
                    <a href="./appendix-01-archiver_&amp;_unarchiver.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.1.</b>
                        
                        归档 &amp; 解档
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.2" data-path="appendix-02-caanimation.html">
            
                
                    <a href="./appendix-02-caanimation.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.2.</b>
                        
                        核心动画
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.3" data-path="appendix-03-kvo.html">
            
                
                    <a href="./appendix-03-kvo.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.3.</b>
                        
                        KVO
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.4" data-path="appendix-04-nil&amp;null.html">
            
                
                    <a href="./appendix-04-nil&amp;null.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.4.</b>
                        
                        nil&amp;null&amp;Nil&amp;NSNull
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.5" data-path="appendix-http_request_field.html">
            
                
                    <a href="./appendix-http_request_field.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.5.</b>
                        
                        常用 HTTP 请求字段
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.6" data-path="appendix-cocoapods.html">
            
                
                    <a href="./appendix-cocoapods.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.6.</b>
                        
                        Cocoapods
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    


        
        <li class="divider"></li>
        <li>
            <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                Published with GitBook
            </a>
        </li>
        
    </ul>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header">
    <!-- Actions Left -->
    <a href="#" class="btn pull-left toggle-summary" aria-label="Table of Contents"><i class="fa fa-align-justify"></i></a>
    <a href="#" class="btn pull-left toggle-search" aria-label="Search"><i class="fa fa-search"></i></a>
    
    <div id="font-settings-wrapper" class="dropdown pull-left">
        <a href="#" class="btn toggle-dropdown" aria-label="Font Settings"><i class="fa fa-font"></i>
        </a>
        <div class="dropdown-menu font-settings">
    <div class="dropdown-caret">
        <span class="caret-outer"></span>
        <span class="caret-inner"></span>
    </div>

    <div class="buttons">
        <button type="button" id="reduce-font-size" class="button size-2">A</button>
        <button type="button" id="enlarge-font-size" class="button size-2">A</button>
    </div>

    <div class="buttons font-family-list">
        <button type="button" data-font="0" class="button">Serif</button>
        <button type="button" data-font="1" class="button">Sans</button>
    </div>

    <div class="buttons color-theme-list">
        <button type="button" id="color-theme-preview-0" class="button size-3" data-theme="0">White</button>
        <button type="button" id="color-theme-preview-1" class="button size-3" data-theme="1">Sepia</button>
        <button type="button" id="color-theme-preview-2" class="button size-3" data-theme="2">Night</button>
    </div>
</div>

    </div>

    <!-- Actions Right -->
    
    <div class="dropdown pull-right">
        <a href="#" class="btn toggle-dropdown" aria-label="Share"><i class="fa fa-share-alt"></i>
        </a>
        <div class="dropdown-menu font-settings dropdown-left">
            <div class="dropdown-caret">
                <span class="caret-outer"></span>
                <span class="caret-inner"></span>
            </div>
            <div class="buttons">
                <button type="button" data-sharing="twitter" class="button">
                    Share on Twitter
                </button>
                <button type="button" data-sharing="google-plus" class="button">
                    Share on Google
                </button>
                <button type="button" data-sharing="facebook" class="button">
                    Share on Facebook
                </button>
                <button type="button" data-sharing="weibo" class="button">
                    Share on Weibo
                </button>
                <button type="button" data-sharing="instapaper" class="button">
                    Share on Instapaper
                </button>
            </div>
        </div>
    </div>
    

    
    <a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Google"><i class="fa fa-google-plus"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Facebook"><i class="fa fa-facebook"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Twitter"><i class="fa fa-twitter"></i></a>
    
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >iOS 网络编程</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="%E9%85%8D%E7%BD%AE-apache-%E6%9C%8D%E5%8A%A1%E5%99%A8">&#x914D;&#x7F6E; Apache &#x670D;&#x52A1;&#x5668;</h1>
<h2 id="%E7%9B%AE%E7%9A%84%EF%BC%9A">&#x76EE;&#x7684;&#xFF1A;</h2>
<ul>
<li>&#x80FD;&#x591F;&#x6709;&#x4E00;&#x4E2A;&#x6D4B;&#x8BD5;&#x7684;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x4E0D;&#x662F;&#x6240;&#x6709;&#x7684;&#x7279;&#x6B8A;&#x7F51;&#x7EDC;&#x670D;&#x52A1;&#x90FD;&#x80FD;&#x627E;&#x5230;&#x514D;&#x8D39;&#x7684;&#xFF01;</li>
</ul>
<h2 id="%E4%B8%BA%E4%BB%80%E4%B9%88%E6%98%AF-apache">&#x4E3A;&#x4EC0;&#x4E48;&#x662F; <code>Apache</code></h2>
<ol>
<li>&#x4F7F;&#x7528;&#x6700;&#x5E7F;&#x7684; Web &#x670D;&#x52A1;&#x5668;&#xFF0C;<code>IIS</code>(&#x5FAE;&#x8F6F; Intenet Infomation Server)</li>
<li>Mac&#x81EA;&#x5E26;&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x4FEE;&#x6539;&#x51E0;&#x4E2A;&#x914D;&#x7F6E;&#x5C31;&#x53EF;&#x4EE5;&#xFF0C;&#x7B80;&#x5355;&#xFF0C;&#x5FEB;&#x6377;</li>
<li>&#x6709;&#x4E9B;&#x7279;&#x6B8A;&#x7684;&#x670D;&#x52A1;&#x5668;&#x529F;&#x80FD;&#xFF0C;Apache&#x90FD;&#x80FD;&#x5F88;&#x597D;&#x7684;&#x652F;&#x6301;
&#x4F8B;&#x5982;&#xFF1A;HTTP <code>PUT</code>/<code>DELETE</code> &#x64CD;&#x4F5C;&#xFF0C;&#x77E5;&#x8BC6;&#x8865;&#x5145;&#x6D89;&#x53CA;&#x7684; <code>HTTPS</code> &#x670D;&#x52A1;</li>
</ol>
<h2 id="%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C">&#x51C6;&#x5907;&#x5DE5;&#x4F5C;</h2>
<ul>
<li>&#x8BBE;&#x7F6E;&#x7528;&#x6237;&#x5BC6;&#x7801;</li>
</ul>
<h2 id="%E9%85%8D%E7%BD%AE">&#x914D;&#x7F6E;</h2>
<ol>
<li><p>&#x914D;&#x7F6E;&#x670D;&#x52A1;&#x5668;&#x7684;&#x5DE5;&#x4F5C;</p>
<ul>
<li>&#x5728; <code>Finder</code> &#x4E2D;&#x521B;&#x5EFA;&#x4E00;&#x4E2A; <code>Sites</code> &#x7684;&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x76F4;&#x63A5;&#x521B;&#x5EFA;&#x5728; <code>/Users/apple</code>(&#x5F53;&#x524D;&#x7528;&#x6237;&#x540D;)&#x76EE;&#x5F55;&#x4E0B;</li>
<li>&#x4FEE;&#x6539;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x7684;<code>&#x4E24;&#x4E2A;&#x8DEF;&#x5F84;</code>&#xFF0C;&#x6307;&#x5411;&#x521A;&#x521A;&#x521B;&#x5EFA;&#x7684;&#x6587;&#x4EF6;&#x5939;</li>
<li>&#x62F7;&#x8D1D;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;</li>
</ul>
</li>
<li><p>&#x914D;&#x7F6E;&#x670D;&#x52A1;&#x5668;&#x6CE8;&#x610F;&#x4E8B;&#x9879;</p>
<ul>
<li>&#x5173;&#x95ED;&#x4E2D;&#x6587;&#x8F93;&#x5165;&#x6CD5;</li>
<li>&#x547D;&#x4EE4;&#x548C;&#x53C2;&#x6570;&#x4E4B;&#x95F4;&#x9700;&#x8981;&#x6709;<code>&#x7A7A;&#x683C;</code></li>
<li>&#x4FEE;&#x6539;&#x7CFB;&#x7EDF;&#x6587;&#x4EF6;&#x4E00;&#x5B9A;&#x8BB0;&#x4F4F;<code>sudo</code>&#xFF0C;&#x5426;&#x5219;&#x4F1A;&#x6CA1;&#x6709;&#x6743;&#x9650;</li>
<li>&#x76EE;&#x5F55;&#x8981;&#x5728; <code>/Users/apple</code>(&#x5F53;&#x524D;&#x7528;&#x6237;&#x540D;)</li>
</ul>
</li>
<li><p>&#x914D;&#x7F6E;&#x670D;&#x52A1;&#x5668;</p>
</li>
</ol>
<blockquote>
<p>&#x63D0;&#x793A;&#xFF1A;$&#x5F00;&#x5934;&#x7684;&#xFF0C;&#x53EF;&#x4EE5;&#x62F7;&#x8D1D;&#xFF0C;&#x4F46;&#x662F;&#x4E0D;&#x8981;&#x62F7;&#x8D1D;$</p>
</blockquote>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x5207;&#x6362;&#x5DE5;&#x4F5C;&#x76EE;&#x5F55;</span>
$ <span class="hljs-built_in">cd</span> /etc/apache2
</code></pre>
<p>&#x5E38;&#x7528;&#x547D;&#x4EE4;</p>
<ul>
<li><code>cd</code> &#x5207;&#x6362;&#x76EE;&#x5F55;</li>
<li><code>pwd</code> &#x786E;&#x8BA4;&#x5F53;&#x524D;&#x76EE;&#x5F55;</li>
<li><code>ls</code> &#x5217;&#x8868;&#x663E;&#x793A;&#x5F53;&#x524D;&#x76EE;&#x5F55;&#x7684;&#x5185;&#x5BB9;</li>
</ul>
<pre><code class="lang-bash"><span class="hljs-comment"># *** &#x5907;&#x4EFD;&#x6587;&#x4EF6;&#xFF0C;&#x4EE5;&#x9632;&#x4E0D;&#x6D4B;&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x6267;&#x884C;&#x4E00;&#x6B21;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;</span>
<span class="hljs-comment"># &#x683C;&#x5F0F; cp (copy &#x7684;&#x7F29;&#x5199;) httpd.conf (&#x6E90;&#x6587;&#x4EF6;) httpd.conf.bak (&#x76EE;&#x6807;&#x6587;&#x4EF6;)</span>

<span class="hljs-variable">$sudo</span> cp httpd.conf httpd.conf.bak

<span class="hljs-comment"># &#x63D0;&#x793A;&#xFF1A;&#x5982;&#x679C;&#x540E;&#x7EED;&#x64CD;&#x4F5C;&#x51FA;&#x73B0;&#x9519;&#x8BEF;&#xFF01;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#xFF0C;&#x6062;&#x590D;&#x5907;&#x4EFD;&#x8FC7;&#x7684; httpd.conf &#x6587;&#x4EF6;</span>

$ sudo cp httpd.conf.bak httpd.conf
</code></pre>
<ul>
<li>&#x7F16;&#x8F91; <code>httpd.conf</code></li>
</ul>
<pre><code class="lang-bash"><span class="hljs-comment"># vim&#x91CC;&#x9762;&#x53EA;&#x80FD;&#x7528;&#x952E;&#x76D8;&#xFF0C;&#x4E0D;&#x80FD;&#x7528;&#x9F20;&#x6807;</span>
<span class="hljs-comment"># &#x7528;vim&#x7F16;&#x8F91;httpd.conf</span>
$ sudo vim httpd.conf

<span class="hljs-comment"># &#x67E5;&#x627E;`DocumentRoot`</span>
* /DocumentRoot

<span class="hljs-comment"># &#x8FDB;&#x5165;&#x7F16;&#x8F91;&#x6A21;&#x5F0F;</span>
* i

<span class="hljs-comment"># &#x4FEE;&#x6539;`&#x4E24;&#x5904;`&#x5F15;&#x53F7;&#x4E2D;&#x7684;&#x8DEF;&#x5F84;</span>

<span class="hljs-comment"># &#x7EE7;&#x7EED;&#x5411;&#x4E0B;&#x627E;&#x5230;</span>

Options FollowSymLinks Multiviews

<span class="hljs-comment"># &#x52A0;&#x4E00;&#x4E2A;&#x5355;&#x8BCD; `Indexes`&#xFF0C;&#x4FEE;&#x6539;&#x540E;&#x7684;&#x7ED3;&#x679C;&#x5982;&#x4E0B;&#xFF1A;</span>

Options Indexes FollowSymLinks Multiviews

<span class="hljs-comment"># &#x8FD4;&#x56DE;&#x547D;&#x4EE4;&#x6A21;&#x5F0F;</span>
* ESC

<span class="hljs-comment"># &#x67E5;&#x627E;php</span>
* /php

<span class="hljs-comment"># &#x5C06;&#x5149;&#x6807;&#x79FB;&#x52A8;&#x5230;&#x9996;&#x884C;</span>

* <span class="hljs-number">0</span>

<span class="hljs-comment"># &#x5220;&#x9664;&#x884C;&#x9996;&#x6CE8;&#x91CA; #</span>

* x

<span class="hljs-comment"># &#x4FDD;&#x5B58;&#x5E76;&#x9000;&#x51FA;</span>
* :wq

<span class="hljs-comment"># &#x4E0D;&#x4FDD;&#x5B58;&#x9000;&#x51FA;!!!!!!!!!</span>
* :q!
</code></pre>
<ul>
<li>&#x62F7;&#x8D1D;php.ini&#x6587;&#x4EF6;</li>
</ul>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x5207;&#x6362;&#x5DE5;&#x4F5C;&#x76EE;&#x5F55;</span>
$ <span class="hljs-built_in">cd</span> /etc

<span class="hljs-comment"># etc &#x76EE;&#x5F55;&#x6709;&#x70B9;&#x7C7B;&#x4F3C;&#x4E8E; windows/system32&#xFF0C;&#x5B58;&#x653E;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7684;&#x76EE;&#x5F55;</span>

$ sudo cp php.ini.default php.ini

<span class="hljs-comment"># &#x91CD;&#x65B0;&#x542F;&#x52A8;apache&#x670D;&#x52A1;&#x5668;</span>
$ sudo apachectl -k restart
</code></pre>
<p>&#x5982;&#x679C;&#x63D0;&#x793A;&#x4EE5;&#x4E0B;&#x9519;&#x8BEF;&#x662F;&#x6B63;&#x5E38;&#x7684;&#xFF1A;</p>
<pre><code class="lang-bash">httpd: Could not reliably determine the server<span class="hljs-string">&apos;s fully qualified domain name, using teacher.local for ServerName
httpd not running, trying to start
</span></code></pre>
<h3 id="%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%EF%BC%9A">&#x5E38;&#x89C1;&#x95EE;&#x9898;&#xFF1A;</h3>
<ul>
<li>&#x5982;&#x679C;&#x70B9;&#x51FB; <code>info.php</code> &#x6587;&#x4EF6;&#xFF0C;&#x51FA;&#x73B0;&#x4E0B;&#x8F7D;&#xFF0C;&#x6216;&#x8005;&#x53EA;&#x662F;&#x663E;&#x793A;&#x4E00;&#x5C0F;&#x6BB5;&#x6587;&#x5B57;</li>
</ul>
<p>&#x89E3;&#x51B3;&#x529E;&#x6CD5;&#xFF1A;</p>
<p>&#x5728;&#x7EC8;&#x7AEF;&#x4E2D;&#x8F93;&#x5165;&#x4EE5;&#x4E0B;&#x4E24;&#x4E2A;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x5173;&#x95ED; apache &#x670D;&#x52A1;&#x5668;</span>
$ sudo apachectl -k stop

<span class="hljs-comment"># &#x91CD;&#x65B0;&#x518D;&#x6B21;&#x542F;&#x52A8; apache</span>
$ sudo apachectl -k start
</code></pre>
<ul>
<li>&#x6BCF;&#x6B21;&#x542F;&#x52A8;&#x8BA1;&#x7B97;&#x673A;&#xFF0C;<code>Apache</code> &#x670D;&#x52A1;&#x5668;&#x9ED8;&#x8BA4;&#x662F;&#x4E0D;&#x4F1A;&#x81EA;&#x52A8;&#x542F;&#x52A8;&#x7684;&#xFF01;</li>
</ul>
<p>&#x53EF;&#x4EE5;&#x542F;&#x52A8;&#x8BA1;&#x7B97;&#x673A;&#x4E4B;&#x540E;&#xFF0C;&#x6253;&#x5F00;&#x7EC8;&#x7AEF;&#xFF0C;&#x8F93;&#x5165;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x542F;&#x52A8; apache</span>
$ sudo apachectl -k start

<span class="hljs-comment"># &#x67E5;&#x8BE2;&#x5386;&#x53F2;&#x8F93;&#x5165;&#x7684;&#x547D;&#x4EE4;</span>
$ <span class="hljs-built_in">history</span>
</code></pre>
<ul>
<li>&#x6700;&#x5E38;&#x89C1;&#x7684;&#x95EE;&#x9898;</li>
</ul>
<p><img src="images/basic/&#x914D;&#x7F6E;Apache&#x5E38;&#x89C1;&#x9519;&#x8BEF;.png" alt=""></p>
<p>&#x4EA4;&#x6362;&#x6587;&#x4EF6;&#x5DF2;&#x7ECF;&#x5B58;&#x5728;&#xFF0C;&#x76F4;&#x63A5;&#x6309;&#x5B57;&#x6BCD; &quot;d&quot;&#xFF0C;&#x53EF;&#x4EE5;&#x5220;&#x9664;&#x4EA4;&#x6362;&#x6587;&#x4EF6;&#xFF01;</p>
<blockquote>
<p>&#x63D0;&#x793A;&#xFF1A;&#x76EE;&#x524D;&#x4E0D;&#x8981;&#x82B1;&#x4E00;&#x5206;&#x949F;&#x53BB;&#x5B66;&#x4E60;vim&#x3002;</p>
</blockquote>
<ul>
<li>&#x6267;&#x884C;&#x811A;&#x672C;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x663E;&#x793A;&#x6CA1;&#x6709;&#x62D2;&#x7EDD;&#x8BBF;&#x95EE;&#xFF01;&#x5927;&#x5BB6;&#x7528; <code>NTFS</code> &#x683C;&#x5F0F;&#x7684; U &#x76D8;&#x62F7;&#x8D1D;&#x7F51;&#x7EDC;&#x7D20;&#x6750;&#xFF01;&#x53EF;&#x80FD;&#x4F1A;&#x628A;&#x6587;&#x4EF6;&#x672C;&#x8EAB;&#x7684;&#x6743;&#x9650;&#x8FC7;&#x6EE4;&#x6389;&#xFF01;</li>
</ul>
<p>&#x4EE5;&#x4E0B;&#x662F;&#x5728;&#x7EC8;&#x7AEF;&#x4E2D;&#x4FEE;&#x6539;&#x6587;&#x4EF6;&#x6743;&#x9650;&#x7684;&#x6307;&#x4EE4;&#xFF01;</p>
<pre><code class="lang-bash">$ ls -la
$ chmod <span class="hljs-number">644</span> info.php&#xFF08;&#x6CA1;&#x6709;&#x6743;&#x9650;&#x7684;&#x6587;&#x4EF6;&#x540D;&#xFF09;
$ chmod <span class="hljs-number">644</span> *.*
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./basic.html" class="navigation navigation-prev " aria-label="Previous page: 基本概念"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="./basic-01-http.html" class="navigation navigation-next " aria-label="Next page: HTTP"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

<script>
require(["gitbook"], function(gitbook) {
    var config = {"fontSettings":{"theme":null,"family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
